<!-- 导航URL -->
<div class="row wrapper border-bottom white-bg page-heading">
	<div class="col-md-12">
		<ol class="breadcrumb">
			<li><a>主页</a></li>
			<li><a>收单机构管理</a></li>
			<li class="active"><strong>{{title}}</strong></li>
		</ol>
	</div>
</div>
<!-- 主要内容 -->
<div class="wrapper wrapper-content animated fadeIn" ng-app
	 ng-controller="bpClusterUpOrAddCtrl" >
	<form class="form-horizontal" name="horizontal" novalidate>
	<div class="row">
		<div class="col-lg-12">
			<div class="ibox float-e-margins">
				<div class="ibox-title">
					<h5>{{title}}</h5>
				</div>
				<div class="ibox-content">
					<div class="form-group">
						<label class="col-sm-2 control-label">组织名称：</label>
						<div class="col-sm-2">
							<select class="form-control" ng-change="getBpList()" ng-model="info.teamId" ng-options="x.teamId as x.teamName for x in teamInfoList"/>
						</div>
						<label class="col-sm-2 control-label">业务产品：</label>
						<div class="col-sm-2">
							<select name="autocomplete-select" id="autocomplete-select" ng-model="info.productId" ng-change="merServiceType(info.productId)"
									ng-options="x.bpId as x.bpName for x in productTypes" style="width: 100%" chosen chosen-data="productTypes" >
							</select>
						</div>
						<label class="col-sm-2 control-label">商户服务：</label>
						<div class="col-sm-2">
							<select class="form-control" ng-model="info.serviceId" ng-options="x.serviceId as x.serviceName for x in productServices" required/>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-2 control-label">服务模式：</label>
						<div class="col-sm-2">
							<select class="form-control" ng-change="checkChannel(info.serviceModel)" ng-model="info.serviceModel" ng-options="x.value as x.text for x in serviceModels"/>
						</div>
						<label ng-show="info.serviceModel==2" class="col-sm-2 control-label">直清通道：</label>
						<div ng-show="info.serviceModel==2" class="col-sm-2">
							<select class="form-control"   ng-model="info.liquidationChannel" ng-options="x.value as x.text for x in liquidationChannels"/>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-2 control-label">启用自动按地点匹配集群：</label>
						<div class="col-sm-2">
							<input ng-model="info.startPc" type="checkbox" class="checkbox" ng-true-value="1" ng-false-value="2"/>
						</div>
					</div>
					<div class="form-group" ng-show="info.startPc==1">
						<label class="col-sm-2 control-label"><i class="red_req">*</i>收单机构：</label>
						<div class="col-sm-2">
							<select class="form-control" ng-change="aceId(info.acqOrgId)" ng-model="info.acqOrgId" ng-options="x.value as x.text for x in acqOrgs" required/>
						</div>
					</div>
					<div class="form-group" ng-show="info.startPc==1">
						<label class="col-sm-2 control-label"><i class="red_req">*</i>收单服务类型：</label>
						<div class="col-sm-2">
							<select class="form-control" ng-model="info.acqServiceType" ng-options="x.value as x.text for x in acqServiceTypes" required/>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-2 control-label">默认集群编号：</label>
						<div class="col-sm-2">
							<input type="text" class="form-control" ng-model="info.defGroupCode" name="defGroupCode" ng-pattern="/^[0-9]*$/"/>
							<div class="req_mesg">
								<span ng-bind="info.groupName"></span>
							</div>
							<div class="req_mesg" ng-show="horizontal.defGroupCode.$dirty">
								<span ng-show="horizontal.defGroupCode.$error.pattern">请输入正确默认集群编号</span>
							</div>
						</div>
					</div>
					<div class="form-group">
						<div class="block m-t-xs">
                           		<strong>备注：</strong>
									当勾选了启用自动按地点匹配集群，根据收单机构，收单服务类型，地点查找合适的集群，若没有找到则使用默认集群。<br/>
									当未勾选启用自动按地点匹配集群，直接使用默认集群。
						   </div>
					</div>
					<div class="form-group">
						<label class="col-sm-2 control-label"></label>
						<div class="col-sm-4">
							<input type="button" class="btn btn-primary btn-mr20" ng-disabled="horizontal.defGroupCode.$error.pattern || info.startPc==1 && horizontal.$invalid || submitting" ng-click="commit()" value='提交'>
							<a type="button" class="btn btn-primary4" ui-sref="org.bpClusterQuery">返回</a>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
	</form>
</div>